1. Field of the Invention
The present invention relates to a priority encoder for encoding thermometer codes.
2. Description of the Related Art
A time to digital converter (hereinafter, referred to as TDC) is known as a device to convert a time difference that occurs between the timing of transition of a first signal (hereinafter, referred to as a start signal) and the timing of transition of a second signal (stop signal) into a digital value. The scheme using a Vernier delay circuit in a TDC to achieve high time resolution is proposed.
FIG. 1 shows the structure of a TDC 300 where a Vernier delay circuit 200 is used. The TDC 300 comprises a Vernier delay circuit 200 and a priority encoder 100. The Vernier delay circuit 200 receives a start signal Sstart and a stop signal Sstop and produces a thermometer code TC where a change in the values occurs at a bit position determined by a time difference. The Vernier delay circuit 200 comprises a first multi-stage delay circuit 210 and a second multi-stage delay circuit 220, and a thermometer latch TL0-TLN.
The first multi-stage delay circuit 210 includes a total of N first delay elements D1 connected to form multiple stages. The circuit 210 provides a delay of a first predetermined amount t1 to the start signal Sstart in each stage and outputs a total of (N+1) delayed start signals SA0-SAN delayed by different amounts. Similarly, the second multi-stage delay circuit 220 includes a total of N second delay elements D2 connected to form multiple stages. The circuit 220 provides a delay of a second predetermined amount t2 to the stop signal Sstop in each stage and outputs a total of (N+1) delayed stop signals SB0-SBN delayed by different amounts.
The first predetermined amount t1 of delay is set to be longer than the second predetermined amount t2. The time difference between the start signal Sstart and the stop signal Sstop is decreased by Δt=(t1−t2) as the signals pass through a delay element of each stage in the first multi-stage delay circuit 210 and the second multi-stage delay circuit 220. Given that the initial time difference between the start signal Sstart and the stop signal Sstop is τ, reversal of timing of the edges of the two signals occurs when the signals have passed a total of (τ/Δt) stages of delay elements.
The thermometer latch TLj in the j-th stage (0≦j≦N) latches the delayed stop signal SBj output from the j-th stage when the delayed start signal SAj output from the j-th stage occurs. For convenience, a stage preceding the first stage will be refereed as a 0-th stage. In other words, the thermometer latch TL0 in the 0-th stage receives the start signal before being delayed and the stop signal before being delayed.
As a result, the output from the thermometer latch TL will be 0 until the stop signal Sstop catches up with the start signal Sstart. Once the stop signal catches up the start signal, the output from the thermometer latch TL will be 1. Thus, the data latched by a total of (N+1) thermometer latches TL0-TLN are output as the thermometer code TC [0:N]. The term thermocode derives from the fact that the bit value changes from 1 to 0 (or 0 to 1) at a particular bit in the bit series.
When the stop signal Sstop fails to catch up with the start signal Sstart, all bits of the thermometer code TC will be 0. When the stop signal Sstop is input before the start signal Sstart, all bits will be 1.
The thermometer code TC output from the Vernier delay circuit 200 is merely a bit series. Therefore, the code needs to be converted into a predetermined code (e.g., a binary code) before being imported into a computer. The priority encoder 100 encodes the thermometer code TC into, for example, a binary code.
[patent document No. 1] JP 2005-223912
[patent document No. 2] JP 2002-139553
[patent document No. 3] JP H10-247842
[non-patent document No. 1] MC14532B Product specification, 8-bit priority encoder,
[online], Internet <URL: http://www.onsemi.com/pub/Collateral/MC14532B-D.PDF>
In the related art, a priority encoder is formed by combining logic gates based on a logical table showing the correspondence between the bits of an input thermometer code and the bits of an output binary code. If the number of bits of a thermometer code TC is on the order of 10-100 bits, a priority encoder realistically sized in terms of the circuit area can be formed using the related-art scheme.
However, as the number of bits of a thermometer code reaches the order of 100-10000, the number of logical gates required grows exponentially, making it difficult to put a related-art priority encoder in use.